<template>
    <div>
        <input type="text" v-model="todo" @keydown.enter='fn'>
        <list :data='ary' @change='change' :qqq=123  :www=234></list>
    </div>
</template>
<script>
// @ is an alias to /src
import list from './list'
export default {
    name: 'XXX',
    data() {
        return {
          todo:'',
          ary:[1111,22222,33333]
        }
    },
    methods: {
      fn(){
        this.ary.unshift(this.todo)
        this.todo = ''
      },
      change(list){
        this.ary = list
      }
    },
    components: {
        list
    }
}
</script>
<style lang="less">

</style>